package com.liumuxian.base.controller;

import com.liumuxian.base.pojo.IntegralType;
import com.liumuxian.base.service.IntegralTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/integralType")
public class IntegralTypeController {
    @Autowired
    IntegralTypeService integralTypeService;
    @RequestMapping("/save")
    public String save(IntegralType integralType){
        integralTypeService.save(integralType);
        return null;
    }

    @RequestMapping("/updatetopage")
    public String updatetopage(String id){
        IntegralType integralType=integralTypeService.updatetopage(id);
        return null;
    }

    @RequestMapping("/updates")
    public String updates(IntegralType integralType){
        integralTypeService.updates(integralType);
        return null;
    }

    @RequestMapping("/findAll")
    public Page<IntegralType> findAll(Integer pagesize, Integer pagenumber, IntegralType integralType) throws Exception {
        return integralTypeService.findAll(pagesize,pagenumber,integralType);
    }

    @RequestMapping("/deletes")
    public String deletes(String id){
        integralTypeService.deletes(id);
        return null;
    }
}
